const { ccclass, property } = cc._decorator;

@ccclass
export default class WinNodeBase extends cc.Component {
    @property(cc.Node)
    FormBg: cc.Node = null;
    @property(cc.Node)
    OkBt: cc.Node = null;
    isclose: boolean = false;

    init() {
        if (this.OkBt)
            this.OkBt.on("click", this.mainClose, this);
    }
    mainClose() {
        if (this.isclose)
            return;
        this.isclose = true;
        let event = new cc.Event.EventCustom("mainClose", true);
        this.node.dispatchEvent(event);
    }
}
